﻿Imports System.Collections.Generic
Imports System.Linq
Imports System.Text


''' <summary>
''' Clase que define la entidad de negocio Familia
''' </summary>
''' <remarks></remarks>
Public Class cFamilia
    Inherits cPatenteFamiliaElement

    Private _iFam_Codigo As Int16
    Private _sFam_Descrip As String
    Private _iDVH As Int32
    Private _Checked As Boolean


    Private _ListPatentes As List(Of cPatenteFamiliaElement)

    Public Property Fam_Codigo() As Int16
        Get
            Return _iFam_Codigo
        End Get
        Set(value As Int16)
            _iFam_Codigo = value
        End Set
    End Property

    Public Property Fam_Descrip() As String
        Get
            Return _sFam_Descrip
        End Get
        Set(value As String)
            _sFam_Descrip = value
        End Set
    End Property

    Public Property DVH() As Int32
        Get
            Return _iDVH
        End Get
        Set(value As Int32)
            _iDVH = value
        End Set
    End Property

    Public Property Checked As Boolean
        Get
            Return _Checked
        End Get
        Set(value As Boolean)
            _Checked = value
        End Set
    End Property


    Public Sub New()
    End Sub

    Public Overrides Sub Add(element As cPatenteFamiliaElement)
        _ListPatentes.Add(element)
    End Sub

    Public Overrides ReadOnly Property ChildrenCount As Int16
        Get
            Return _ListPatentes.Count
        End Get
    End Property

    Public Overrides ReadOnly Property Nombre As String
        Get
            Return Me._sFam_Descrip
        End Get
    End Property

    Public Overrides Sub Remove(element As cPatenteFamiliaElement)
        _ListPatentes.Remove(element)
    End Sub

    Public Overrides Property ListChilds As List(Of cPatenteFamiliaElement)
        Get
            Return _ListPatentes
        End Get
        Set(value As List(Of cPatenteFamiliaElement))
            _ListPatentes = value
        End Set
    End Property

End Class
